﻿using Basic.HrRemoteModel;
using WeDonekRpc.Helper.Validate;

namespace Basic.FlowRemoteModel.FlowAppPower.Model
{
    public class AppPowerSet
    {
        [NumValidate("flow.app.id.error", 1)]
        public long AppId
        {
            get;
            set;
        }
        /// <summary>
        /// 子系统ID
        /// </summary>
        [NumValidate("hr.sub.system.id.error", 1)]
        public long SubSystemId { get; set; }

        /// <summary>
        /// 父级菜单ID
        /// </summary>
        [NumValidate("hr.power.parent.id.error", 0)]
        public long ParentId { get; set; }

        /// <summary>
        /// 名字
        /// </summary>
        [NullValidate("hr.power.name.null")]
        [LenValidate("hr.power.name.len", 2, 50)]
        [FormatValidate("hr.power.name.error", ValidateFormat.中文字母数字括号)]
        public string Name { get; set; }

        /// <summary>
        /// 说明
        /// </summary>
        [LenValidate("hr.power.description.len", 0, 255)]
        public string Description { get; set; }


        /// <summary>
        /// 图标
        /// </summary>
        [LenValidate("hr.power.icon.len", 0, 100)]
        [FormatValidate("hr.power.icon.error", ValidateFormat.图标样式)]
        public string Icon { get; set; }

        [EnumValidate("hr.power.type.error", typeof(PowerType))]
        public PowerType PowerType
        {
            get;
            set;
        }
    }
}
